package top.go2do.common.threadLocal;

import top.go2do.common.module.UserInfoBO;

/**
 * @author xingyuji
 * @date 2025/3/28 06:09
 * @description
 */
public class UserInfoContext {
    private static final ThreadLocal<UserInfoBO> userInfoThreadLocal = new ThreadLocal<>();

    public static void set(UserInfoBO userInfoBO) {
        userInfoThreadLocal.set(userInfoBO);
    }

    public static UserInfoBO get() {
        return userInfoThreadLocal.get();
    }

    public static void remove() {
        userInfoThreadLocal.remove();
    }
}
